View Issue Details

IDProjectCategoryView StatusLast Update
0001195K18X001.00 SKB SWANSWpublic2021-12-22 10:14
Reporter(ALTech) Wooshin Kang Assigned To(ALTech) Wooshin Kang Due Date2021-04-30 09:50
PriorityhighSeveritys2-severeReproducibilityhave not tried
Status closedResolutionreopened 
Summary0001195: [SWAN] NEW function for karaoke app.
DescriptionBelow is new requirement of SKB for karaoke MIC.
Please implement it.
 
1. Please keep sending data to amp driver to output from speaker.
2. Copy data for speaker from step1 and send it to audio record class.
3. Android Audio Record Class get data using "MediaRecorder.AudioSource MIC type=VOICE_COMMUNICATION"
4. Some Apk will use it. (example, Karaoke app uses it to get score)
 
Thanks.
TagsNo tags attached.
Attach Tags

Users monitoring this issue

User List (ALTech) SY Yoon , (SW) Jacky Chiang , (SW) River Wong , (SW) Sam Yang , (SW) Sita Huang

Activities

(ALTech) SY Yoon

2021-04-15 09:36

developer   ~0006720

Hi Mr. Jacky Chiang,

Could you provide your plan to implement it ?

(SW) Jacky Chiang

2021-04-15 10:10

manager   ~0006722

Hi Wooshin,

We will evaluate and check the change and effort in SW architecture on Synaptics BSP and get back to you soon.

(ALTech) Wooshin Kang

2021-05-26 09:13

developer   ~0007230

Hi Jacky,

In step 2, you don't need to copy data for speaker. App will out mic data to speaker.

Thanks.

(SW) Jacky Chiang

2021-05-26 10:04

manager   ~0007237

Hi Wooshin,

    Do you have test app ready for our testing ?

Thanks~

(SW) Sita Huang

2021-05-26 10:31

developer   ~0007240

Last edited: 2021-05-26 10:33

Hi Wooshin,

     We think that if the audio patch of AMP SOC is not used, it may have a latency of sound output from APP.

     If possible, we need test APP to observe latency of this function if comment 7230 is ready.

Thanks.

(ALTech) Wooshin Kang

2021-05-26 10:42

developer   ~0007241

Hi, Sita

I have no any test app, so you have to make record app using below code and check if mic data is recorded correctly.

recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource. VOICE_COMMUNICATION);

Thanks.

(ALTech) Wooshin Kang

2021-05-26 11:11

developer   ~0007243

Hi, Sita

I will explain again.

There are various karaoke APP and some app will use audio record class for making karaoke score.
So you have to make like below sequence.

1. check is it open "audio record class (MediaRecorder.AudioSource MIC type=VOICE_COMMUNICATION) from APP ?
2. If opened, send mic data to audio record class
3. If not opened, send mic data to SPEAKER or HDMI.

If you have any question, please inform me.

Thanks.

(SW) River Wong

2021-05-26 12:02

developer   ~0007245

Last edited: 2021-05-26 12:03

Hi Wooshin,

As our experience, if human's voice path is from "microphone->audio HAL->framework->app->framework->audio HAL->speaker", it will has big and unacceptable latency.
For example, you will hear your voice > 300ms later after you speak. You will feel your voice is late and not sync with music. It is not acceptable for karaoke application.
That's why we added audio patch(a fast path from "microphone->audio HAL->speaker") in Eagle and SWAN to lower the latency in current implementation.
If karaoke app needs to record audio for score, we still think it need to output to speaker by audio patch not by karaoke app. Otherwise the latency is a big problem.

(ALTech) Wooshin Kang

2021-05-26 13:40

developer   ~0007249

Hi River,

Inopiatech implemented it and did test.
They report there is no delay to SKB and skb decide to use same method.

@Sita
Inopiatech share test APP. Please do test using attached APP.
KaraokMicTest.7z (4,496,968 bytes)

(ALTech) Wooshin Kang

2021-06-02 10:54

developer   ~0007335

Last edited: 2021-06-02 10:55

Hi Sita,

You can download karaoke test APP. Please check it.

https://drive.google.com/file/d/1xcQpk5SuSbgfd9lGv15wlL1K1ACkmFiF/view

Thanks.

(SW) Sita Huang

2021-06-02 11:22

developer   ~0007336

Hi Wooshin,

   I will test the feature with this APP. Thanks for information.

Thanks.

(SW) Sita Huang

2021-06-18 16:42

developer   ~0007504

Last edited: 2021-06-18 17:47

Hi Wooshin,

Test image path on alt server: /release_by_fxn/swan_test_image/Karaoke_Record/BFX-UA300_20210618_SD_v524r23_DelayTest.

The following notes about test image:
1. The MIC setting function(DEVICE_SetMicOnOff) is not called in the new APP(app-release.apk, skb), so we hard code to enable MIC in default. Kumyoung APP is still working normally.
2. Please verify if the MIC setting function(DEVICE_SetMicOnOff) will be called in new APP or not with APP vendor. It will affect our schedule for feature implementation.
3. The voice from audioTrack of new APP sounds very quiet, so we think the volume of voice maybe need to be amplified in APP. We keep finding root cause for this behavior.
4. Other audio feature(including audio routing, NUGU, youtube, and BTV) have been not fully tested yet. We cannot ensure these feature is working normally.

Thanks.

(ALTech) Wooshin Kang

2021-06-21 18:26

developer   ~0007510

Last edited: 2021-06-25 10:00

Hi Sita,

Thanks for image.
I will test it and share the result.

(ALTech) Wooshin Kang

2021-06-25 09:59

developer   ~0007553

Last edited: 2021-06-25 10:00

Hi Sita,

SKB decide to go original way due delay.
< Original Idea >
1. Please keep sending data to amp driver to output from speaker.
2. Copy data for speaker from step1 and send it to audio record class.
3. Android Audio Record Class get data using "MediaRecorder.AudioSource MIC type=VOICE_COMMUNICATION"
4. Some Apk will use it. (example, Karaoke app uses it to get score)

I am sorry for confusing.
Thanks.

(SW) Sita Huang

2021-06-25 17:50

developer   ~0007558

Hi Wooshin,

Test image has been uploaded to ALT server, file path: /release_by_fxn/swan_test_image/Karaoke_Record/BFX-UA300_20210625_SD_v524r23_DelayTest

Some notes for this test image:
1. Following #c7553 comment, we change some behavior in HAL layer.
2. Enable MIC in default for testing. Kumyoung APP is still working normally.
3. The delay time of the both APP is about 160~180 ms.
4. Other audio feature have been not fully tested yet.
5. Please confirm with APP provider vendor if MIC setting function(DEVICE_SetMicOnOff) will be called. We still need some time to change code.

Thanks.

(ALTech) Wooshin Kang

2021-06-28 19:02

developer   ~0007570

Hi Sita,

I have attached new test app.
Please check it.

Thanks.
app-release-5th.apk (296,770,697 bytes)

(ALTech) Wooshin Kang

2021-07-08 12:37

developer   ~0007627

Hi Sita,

SKB did check delay time, delay is 127ms.
They are saying maximum delay should be under 100ms.
Please check how to do reduce delay under 100ms.

Thanks,

(SW) Sita Huang

2021-07-09 17:58

developer   ~0007641

Hi Wooshin,

We would like to know how SKB checks the delay time(127ms) and what APP is used? Could you confirm it with SKB?
In addition, we will check the delay time of audio stream in audio patch to find out how to reduce delay time.

Thanks.

(ALTech) Wooshin Kang

2021-07-12 11:10

developer   ~0007646

Hi sita,

I will check it with SKB.

thanks.

(SW) Sita Huang

2021-07-21 16:33

developer   ~0007708

Hi Wooshin,

Test image has been uploaded to ALT server, file path: /release_by_fxn/swan_test_image/Karaoke_Record/BFX-UA300_20210721_SD_v531r03

We found the a way to reduce delay time of MIC and It works. The latest delay time is about 95ms (maybe +/- 5ms).
Please confirm the test image.

Thanks.

(SW) Sita Huang

2021-07-27 16:12

developer   ~0007745

Hi Wooshin,

I already commit the modification about this feature.

Thanks.

(ALTech) Wooshin Kang

2021-09-27 09:45

developer   ~0008293

Hi Sita,

I have done test for delay of karaoke.
I feel there is too much delay time.
Could you check it is committed correctly ?

Thanks.

(ALTech) Wooshin Kang

2021-09-27 09:46

developer   ~0008294

please check my comment.

(ALTech) Wooshin Kang

2021-10-01 10:43

developer   ~0008356

Hi Sita,

Do you have any update ?

(SW) Brent Choi

2021-10-01 17:15

no access   ~0008358

There are Karaoke mic delay results
[Test Enviroment]
FW: 10/1 Daily Build
Karaoke app version: app-release-5th.apk
DVT2: No any rework (ESMT Amp without A113X)
DVT3: Reworked mic and ref delay issue (Wellang Amp with A113X)

[Test Results]
DVT2: 96ms, 4.649 ~ 4.735
DVT3: 160ms, 1.564 ~ 1.727
DVT2.jpg (264,591 bytes)
DVT3.jpg (251,940 bytes)   
DVT3.jpg (251,940 bytes)   

(SW) River Wong

2021-10-01 17:43

developer   ~0008359

Hi Wooshin,

The I2S path for DVT2 is: VS550 ------ ESMT amplifier
The I2S path for DVT3 is: VS550 ------IS2 Buffer IC ------ A113X ------ Wellang amplifier
Obviously, the 60ms delay is increasing in DVT3 by A113x or Buffer IC.
I guess DVT3 will be the main reason. Please also help to check if A113X cause the delay and can optimize to reduce delay.

(SW) River Wong

2021-10-01 18:06

developer   ~0008360

Hi Wooshin,

From HW's information, the I2S Buffer IC only delay 4.8ns. So, please check if you can shrink the delay in A113X.

(SW) River Wong

2021-10-04 10:32

developer   ~0008362

Hi Wooshin,

I measured the I2S data before and after A113X with version 0x30 in the attached picture.
As you can see, the time difference is about 59.2ms. So, the extra delay is caused by A113X.
A113X_ver0x30_I2S_delay.jpg (34,047 bytes)   
A113X_ver0x30_I2S_delay.jpg (34,047 bytes)   

(ALTech) Wooshin Kang

2021-10-05 08:53

developer   ~0008369

Hi River,

Actually, i think that mic data only was increased because i couldn't feel delay of music from karaoke app. If there is delay in A113x side, it should be delayed both but it is not.

(SW) River Wong

2021-10-05 13:50

developer   ~0008370

Last edited: 2021-10-05 13:50

Hi Wooshin,

Any audio (music or microphone) will pass A113X and all these sound will has about 60ms delay in A113x.
But when you are singing, you will listen to music that is just outputted by A113X and then your mouth starts to sing.
So, you are based on the music that is already output from A113x (And the next music is already in A113X buffer and will output very soon).
And your voice is just starting to enter microphone and need to walk through the 160ms path (mic->VS550->A113x->Wellang->Speaker).

(ALTech) Wooshin Kang

2021-10-13 10:13

developer   ~0008427

Hi River,

I can understand your explanation of this issue but my feeling is not good.
If I will get any comment from SKB, I will share that on here.

(SW) River Wong

2021-12-22 10:14

developer   ~0008985

The delay time is caused by A113X. So we close this issue.
If you still have any problem, you can reopen it.

Issue History

Date Modified Username Field Change
2021-04-13 08:52 (ALTech) Wooshin Kang New Issue
2021-04-13 08:52 (ALTech) Wooshin Kang Status new => assigned
2021-04-13 08:52 (ALTech) Wooshin Kang Assigned To => (SW) Jacky Chiang
2021-04-15 09:34 (ALTech) SY Yoon Issue Monitored: (ALTech) SY Yoon
2021-04-15 09:35 (ALTech) SY Yoon Issue Monitored: (SW) River Wong
2021-04-15 09:36 (ALTech) SY Yoon Note Added: 0006720
2021-04-15 10:10 (SW) Jacky Chiang Note Added: 0006722
2021-05-26 09:13 (ALTech) Wooshin Kang Note Added: 0007230
2021-05-26 10:04 (SW) Jacky Chiang Note Added: 0007237
2021-05-26 10:06 (SW) Jacky Chiang Issue Monitored: (SW) Sita Huang
2021-05-26 10:06 (SW) Jacky Chiang Assigned To (SW) Jacky Chiang => (SW) Sita Huang
2021-05-26 10:06 (SW) Jacky Chiang Issue Monitored: (SW) Jacky Chiang
2021-05-26 10:31 (SW) Sita Huang Note Added: 0007240
2021-05-26 10:33 (SW) Sita Huang Note Edited: 0007240
2021-05-26 10:42 (ALTech) Wooshin Kang Note Added: 0007241
2021-05-26 11:11 (ALTech) Wooshin Kang Note Added: 0007243
2021-05-26 12:02 (SW) River Wong Note Added: 0007245
2021-05-26 12:02 (SW) River Wong Note Edited: 0007245
2021-05-26 12:03 (SW) River Wong Note Edited: 0007245
2021-05-26 13:40 (ALTech) Wooshin Kang File Added: KaraokMicTest.7z
2021-05-26 13:40 (ALTech) Wooshin Kang Note Added: 0007249
2021-06-02 10:54 (ALTech) Wooshin Kang Note Added: 0007335
2021-06-02 10:55 (ALTech) Wooshin Kang Note Edited: 0007335
2021-06-02 11:22 (SW) Sita Huang Note Added: 0007336
2021-06-18 16:42 (SW) Sita Huang Note Added: 0007504
2021-06-18 17:47 (SW) Sita Huang Note Edited: 0007504
2021-06-21 18:26 (ALTech) Wooshin Kang Note Added: 0007510
2021-06-25 09:59 (ALTech) Wooshin Kang Note Added: 0007553
2021-06-25 10:00 (ALTech) Wooshin Kang Note Edited: 0007510
2021-06-25 10:00 (ALTech) Wooshin Kang Note Edited: 0007553
2021-06-25 17:50 (SW) Sita Huang Note Added: 0007558
2021-06-28 19:02 (ALTech) Wooshin Kang File Added: app-release-5th.apk
2021-06-28 19:02 (ALTech) Wooshin Kang Note Added: 0007570
2021-07-08 12:37 (ALTech) Wooshin Kang Note Added: 0007627
2021-07-09 17:58 (SW) Sita Huang Note Added: 0007641
2021-07-12 11:10 (ALTech) Wooshin Kang Note Added: 0007646
2021-07-15 16:08 (SW) Sam Yang Issue Monitored: (SW) Sam Yang
2021-07-21 16:33 (SW) Sita Huang Note Added: 0007708
2021-07-27 16:12 (SW) Sita Huang Assigned To (SW) Sita Huang => (ALTech) Wooshin Kang
2021-07-27 16:12 (SW) Sita Huang Status assigned => resolved
2021-07-27 16:12 (SW) Sita Huang Resolution open => fixed
2021-07-27 16:12 (SW) Sita Huang Note Added: 0007745
2021-09-27 09:45 (ALTech) Wooshin Kang Note Added: 0008293
2021-09-27 09:46 (ALTech) Wooshin Kang Assigned To (ALTech) Wooshin Kang => (SW) Sita Huang
2021-09-27 09:46 (ALTech) Wooshin Kang Status resolved => feedback
2021-09-27 09:46 (ALTech) Wooshin Kang Resolution fixed => reopened
2021-09-27 09:46 (ALTech) Wooshin Kang Note Added: 0008294
2021-10-01 10:43 (ALTech) Wooshin Kang Note Added: 0008356
2021-10-01 10:43 (ALTech) Wooshin Kang Status feedback => assigned
2021-10-01 17:15 (SW) Brent Choi File Added: DVT2.jpg
2021-10-01 17:15 (SW) Brent Choi File Added: DVT3.jpg
2021-10-01 17:15 (SW) Brent Choi Note Added: 0008358
2021-10-01 17:43 (SW) River Wong Note Added: 0008359
2021-10-01 18:06 (SW) River Wong Note Added: 0008360
2021-10-04 10:32 (SW) River Wong File Added: A113X_ver0x30_I2S_delay.jpg
2021-10-04 10:32 (SW) River Wong Note Added: 0008362
2021-10-05 08:53 (ALTech) Wooshin Kang Note Added: 0008369
2021-10-05 13:50 (SW) River Wong Note Added: 0008370
2021-10-05 13:50 (SW) River Wong Note Edited: 0008370
2021-10-13 10:13 (ALTech) Wooshin Kang Note Added: 0008427
2021-12-22 09:15 (SW) River Wong Status assigned => resolved
2021-12-22 10:14 (SW) River Wong Assigned To (SW) Sita Huang => (ALTech) Wooshin Kang
2021-12-22 10:14 (SW) River Wong Status resolved => closed
2021-12-22 10:14 (SW) River Wong Note Added: 0008985